A truckload of "zero value add" changes to quiesce warnings and play
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 20 Feb 2006 21:59:19 +0000 (21:59 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 20 Feb 2006 21:59:19 +0000 (21:59 +0000)
nicer with MSVC.

gpsbabel/coldsync/pdb.c
gpsbabel/defs.h
gpsbabel/gtm.c
gpsbabel/jeeps/gpsapp.c
gpsbabel/mingw/wintesto.cmd
gpsbabel/msvc/README.msvc
gpsbabel/nmea.c
gpsbabel/rgbcolors.c
gpsbabel/unicsv.c

index a6979821edec27b43d5d15f27f1781f539341552..27a35bef1250b3f0ca0e975c9c022535622af2f7 100644 (file)
@@ -6,7 +6,7 @@
  *     You may distribute this file under the terms of the Artistic
  *     License, as specified in the README file.
  *
- * $Id: pdb.c,v 1.8 2005-10-13 22:08:01 robertl Exp $
+ * $Id: pdb.c,v 1.9 2006-02-20 21:59:19 robertl Exp $
  */
 /* XXX - The way zero-length records are handled is a bit of a kludge. They
  * shouldn't normally exist, with the exception of expunged records. But,
  */
 #if defined (__WIN32__)
 #include <io.h>
+#define lseek _lseek
+#define write _write
+#define read _read
+#define close _close
 #else
 #include <unistd.h>
 #endif
@@ -1587,7 +1591,7 @@ pdb_LoadAppBlock(int fd,
        offset = lseek(fd, 0L, SEEK_CUR);       /* Find out where we are */
        if (offset != db->appinfo_offset)
        {
-               if (offset > db->appinfo_offset)
+               if (offset > (off_t) db->appinfo_offset)
                {
                        /* Oops! We're in the wrong place */
                        fprintf(stderr, _("Warning: AppInfo block in \"%.*s\" "
@@ -1700,7 +1704,7 @@ pdb_LoadSortBlock(int fd,
        offset = lseek(fd, 0L, SEEK_CUR);       /* Find out where we are */
        if (offset != db->sortinfo_offset)
        {
-               if (offset > db->sortinfo_offset)
+               if (offset > (off_t) db->sortinfo_offset)
                {
                        /* Oops! We're in the wrong place */
                        fprintf(stderr, _("Warning: sort block in \"%.*s\" "
@@ -1791,7 +1795,7 @@ pdb_LoadResources(int fd,
                                        /* Find out where we are now */
                if (offset != rsrc->offset)
                {
-                       if (offset > rsrc->offset)
+                       if (offset > (off_t) rsrc->offset)
                        {
                                fprintf(stderr, _("Warning: resource %d in "
                                                  "\"%.*s\" isn't where "
@@ -1924,7 +1928,7 @@ pdb_LoadRecords(int fd,
                                        /* Find out where we are now */
                if (offset != rec->offset)
                {
-                       if (offset > rec->offset)
+                       if (offset > (off_t) rec->offset)
                        {
                                fprintf(stderr, _("Warning: record %d in "
                                                  "\"%.*s\" isn't where "
index cce4daba46f457c2622d5b59ae3d598d9716c337..0cce2d9828283c36978ab47412110a34e6b99049 100644 (file)
@@ -50,6 +50,7 @@
 #  define snprintf _snprintf
 #  define vsnprintf _vsnprintf
 #  define fileno _fileno
+#  define strdup _strdup
 #endif
 
 /* Turn off numeric conversion warning */
index d31570b6840b280cf355d1a17383fdda3495cc00..459c5b863b0a2f54f7c76e9e88e0486a0babad2e 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "defs.h"
+#include "jeeps/gpsmath.h"
 
 static FILE *fd, *ofd;
 static int indatum;
@@ -215,7 +216,7 @@ fwrite_string(FILE *fd, const char *str)
        }
 }
 
-static char *
+void
 fwrite_fixedstring(FILE *fd, const char *str, int fieldlen)
 {
        int len = str ? strlen(str) : 0;
@@ -437,7 +438,6 @@ void convert_datum(double *lat, double *lon)
 static void
 gtm_rd_init(const char *fname)
 {
-       char buf[256];
        int version;
        char *name;
        fd = xfopen(fname, "rb", MYNAME);
index 87c3387b448cfec108b0ea441b8f7bf948d72394..b815edcaed2155d3ed51a62ab0ac140dee63c203 100644 (file)
@@ -185,7 +185,6 @@ static int32 GPS_A000(const char *port)
     GPS_PPacket rec;
     int16 version;
     int16 id;
-    char  tstr[256];
 
     if(!GPS_Serial_On(port, &fd))
        return gps_errno;
@@ -2026,7 +2025,7 @@ static void GPS_D109_Send(UC *data, GPS_PWay way, int32 *len, int protoid)
     GPS_Util_Put_Int(p,(int32)GPS_Math_Deg_To_Semi(way->lon));
     p+=sizeof(int32);
     if (way->alt_is_unknown) {
-       GPS_Util_Put_Float(p,1.0e25);
+       GPS_Util_Put_Float(p,(const float) 1.0e25);
     } else {
        GPS_Util_Put_Float(p,way->alt);
     }
index 2171ab2345a61be703bae92615a49f45a792c080..bfad8ce213097bd5226806e4b0477e83f39bb728 100644 (file)
@@ -112,6 +112,18 @@ DEL %TMPDIR%\gl.gpx %TMPDIR%\gpx.gpx
 @echo.\r
 CALL :COMPARE %TMPDIR%\gpx.gpx %TMPDIR%\gu.wpt\r
 \r
+REM GTM\r
+DEL %TMPDIR%\gl.gpx %TMPDIR%\gpx.gpx\r
+@echo on\r
+@echo Testing...\r
+%PNAME% -i gtm -f reference\sample.gtm -o gpx -F %TMPDIR%\gtm1.gpx\r
+%PNAME% -i gpx -f %TMPDIR%\gtm1.gpx -o gtm -F %TMPDIR%\gtm.gtm\r
+%PNAME% -i gtm -f %TMPDIR%\gtm.gtm -o gpx -F %TMPDIR%\gtm2.gpx\r
+@echo off\r
+@echo.\r
+CALL :COMPARE %TMPDIR%\gtm1.gpx %TMPDIR%\gtm2.gpx\r
+CALL :COMPARE %TMPDIR%\gtm.gtm reference\sample.gtm\r
+\r
 REM Magellan Mapsend\r
 DEL %TMPDIR%\mm.mapsend %TMPDIR%\mm.gps\r
 @echo on\r
index 373e22a77d472ea7047de273808341bf666bb997..109648d1bd4b49914b0ed80359ea8906e66d9cd9 100644 (file)
@@ -10,6 +10,11 @@ load the workspace and hit "build all.")  If you load these files in to
 Visual Studio .NET, you may be asked to convert them to the new format; 
 In that case, you should do so.
 
+Note that the "Microsoft Platform SDK" is required in addition to
+the actual compiler package.  If you're using the Express editions,
+you must also reconfigure MSVC to use that as described at:
+       http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
+
 The "Expat" directory contains the import library and header file for the
 Expat DLL.  This may or may not be the latest build of Expat; you might 
 want to check http://expat.sourceforge.net to see if there is a more recent
index 9346fbd6771bd9d081b72596c9459b0230c04a2b..8eda30488ace5e7b6dafc542d834fa28aba300ed 100644 (file)
@@ -571,8 +571,8 @@ nmea_fix_timestamps(route_head *track)
        }
        else
        {
-               queue *elem, *temp;
                time_t prev;
+               queue *elem;
                
                tm.tm_hour = 23;        /* last date found */
                tm.tm_min = 59;
@@ -589,7 +589,6 @@ nmea_fix_timestamps(route_head *track)
                        if (wpt->centiseconds != 0)
                        {
                                time_t dt;
-                               struct tm time;
                                
                                wpt->centiseconds = 0;          /* reset flag */
 
index b9589ed51f5587e0edef0c81f96c670c4f1b5d24..56d6727f95e0a05327b0d8e51bce8b9a743502a4 100644 (file)
@@ -244,5 +244,5 @@ color_to_bbggrr( char *opt_color )
        }
 
        fatal( "unrecognized color name %s\n", opt_color );
-
+       return -1;
 }
index d0a4b7d7530ca146d03f70fb196eae2d014b807b..d72a844b2f14cabad0e724e1135368d0b25c54cd 100644 (file)
@@ -39,7 +39,7 @@ struct {
        int urlcol;
 } unicsv_fieldpos;
 
-static float unicsv_altscale;
+static double unicsv_altscale;
 static char *unicsv_fieldsep;
 
 static
@@ -183,7 +183,7 @@ unicsv_parse_one_line(char *ibuf)
 }
 
 static void 
-unicsv_rd()
+unicsv_rd(void)
 {
        char buff[1024];